import type { UnwrapNestedRefs } from "vue";
export function useUrlParams(params?: UnwrapNestedRefs<any>) {
  const result = ref("");
  watch(
    params,
    (value) => {
      result.value = new URLSearchParams(value).toString();
    },
    { immediate: true },
  );
  return result;
}
